-- GENERATED SPELL FOR [Phoenix-Hawk Hatchling] --


function spell0_20038(pUnit, Event) --@Silence,Self--
pUnit:FullCastSpellOnTarget(37160,pUnit)
pUnit:RegisterEvent('Sorts_20038', 6289, 1)
end

function spell1_20038(pUnit, Event) --@Wing Buffet,Self--
pUnit:FullCastSpellOnTarget(37319,pUnit)
pUnit:RegisterEvent('Sorts_20038', 1000, 1)
end

function Sorts_20038(pUnit, Event)
local choix_sorts_20038 = math.random(0, 1)
if choix_sorts_20038 == 0 then
pUnit:RegisterEvent('spell0_20038', 1, 1)
end
if choix_sorts_20038 == 1 then
pUnit:RegisterEvent('spell1_20038', 1, 1)
end
end

function mob20038_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20038', math.random(1500, 3000), 1)
end

function mob20038_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20038_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20038_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20038, 1, 'mob20038_Action')
RegisterUnitEvent(20038, 2, 'mob20038_Leave')
RegisterUnitEvent(20038, 3, 'mob20038_Kill')
RegisterUnitEvent(20038, 4, 'mob20038_Die')
